{include file='public/head' /}
{include file='public/left' /}
<script type="text/javascript" src="{__STATIC_PATH__}layui/layui.js"></script>
<script type="text/javascript" src="{__STATIC_PATH__}index/js/jquery.min.js"></script>
<div class="main" style="padding:10px;">
        <div class="content">
            <span>商品添加</span>
        </div>
            <form class="layui-form" action="/admin/Index/add" method="POST" enctype="multipart/form-data">
                <div class="layui-form-item">
                    <label class="layui-form-label">标题</label>
                    <div class="layui-input-inline">
                        <input class="layui-input" type="text" name="title">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">分类</label>
                    <div class="layui-input-inline">
                        <select name="cat">
                            <option value="0"></option>
                            {volist name='cat' id='cat_v'}
                                <option value="{$cat_v['id']}">{$cat_v['name']}</option>
                            {/volist}
                        </select>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">原价</label>
                    <div class="layui-input-inline">
                        <input class="layui-input" type="text" name="price">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">折扣</label>
                    <div class="layui-input-inline">
                        <input class="layui-input" type="text" name="discount">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">库存</label>
                    <div class="layui-input-inline">
                        <input class="layui-input" type="text" name="stock">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">图片</label>
                    <div class="layui-input-inline">
                        <input  type="file" name="image" > <!-- class="layui-input" -->
                    </div>
                </div>
                <div class="layui-form-item"">
                    <label class="layui-form-label">文字：</label>
                    <div class="layui-input-inline">
                        <textarea name="intro" cols="80" rows="10" class="textarea"  placeholder="说点什么...100个字符以内" dragonfly="true" onKeyUp="textarea.length(this,100)"></textarea>
                        <p class="textarea-numberbar"><em class="textarea-length">0</em>/100</p>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">是否上新</label>
                    <div class="layui-input-inline">
                        <select name="is_new">
                            <option value="1">是</option>
                            <option value="0">否</option>
                        </select>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">是否热卖</label>
                    <div class="layui-input-inline">
                        <select name="is_hot">
                            <option value="1">是</option>
                            <option value="0">否</option>
                        </select>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">状态</label>
                    <div class="layui-input-inline">
                        <select name="status">
                            <option value="1">开启</option>
                            <option value="0">关闭</option>
                        </select>
                    </div>
                </div>
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn" type="submit">添加</button>
                    <button class="layui-btn" type="button"><a href="/admin/index/index">返回</a></button>
                </div>
            </div>
        </form>
</div>
{include file='public/bottom' /}